package cn.itcast.nems.product.dao.dataobject;

import lombok.Data;
import lombok.NoArgsConstructor;

import java.math.BigDecimal;
import java.time.LocalDate;
import java.util.Objects;

@Data
@NoArgsConstructor
public class TuitionFeeDO {

    /**
     * 生效日期为：开班日期
     */
    public static final String TIME_DIMENSION_CLASS_OPEN = "CLASS_OPEN";
    /**
     * 生效日期为：报名日期
     */
    public static final String TIME_DIMENSION_SING_UP = "SING_UP";

    private int id;

    private String schoolId ;

    /**
     * 班级类型id
     */
    private String classTypeId;
    /**
     * 阶段数
     */
    private String phaseNumber;
    /**
     * 学科id
     */
    private String subjectId;
    /**
     * 品牌：传智，黑马
     */
    private String brand;
    /**
     * 授课模式
     */
    private String teachingModel;
    /**
     * 先付费价格
     */
    private BigDecimal first;
    /**
     * 后付费价格
     */
    private BigDecimal last;

    /**
     * 使用时间
     */
    private LocalDate useDate;

    /**
     * 规则开始使用日期
     */
    private LocalDate startDate;

    /**
     * 规则结束使用日期
     */
    private LocalDate endDate;

    /**
     * 时间维度,CLASS_OPEN SING_UP
     */
    private String timeDimension;
    public TuitionFeeDO(String schoolId , String classTypeId , Integer phaseNumber, String brand, LocalDate useDate) {
        this.schoolId =schoolId;
        this.classTypeId = classTypeId;
        this.phaseNumber = Objects.nonNull(phaseNumber)? String.valueOf(phaseNumber): null;
        this.brand = brand ;
        this.useDate = useDate ;
    }
}
